import 'package:flutter/material.dart';
import 'package:zhihuishequ/constants/ui_constants.dart';
import 'package:zhihuishequ/pages/home.dart';
import 'package:zhihuishequ/pages/login.dart';
import 'package:zhihuishequ/routes.dart';

void main(){
  runApp(App());
}

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      //主题设置
      theme: ThemeData(
        scaffoldBackgroundColor: UIConstants.COLOR_PAGE_BG,    //所有页面脚手架的默认背景
        appBarTheme: AppBarTheme(
          backgroundColor: UIConstants.COLOR_THEME_GREEN,   //顶部标题栏背景色
          foregroundColor: UIConstants.COLOR_THEME_WHITE,   //顶部标题栏文字/图标颜色
          titleTextStyle: TextStyle(fontSize: 18),          //标题字默认大小
          centerTitle: true,                                //标题字居中显示
        ),
      ),
      //路由设置
      routes: appRoutes,
      initialRoute: '/login',                   //默认的初始页面
      //外观设置
      debugShowCheckedModeBanner: false,
    );
  }
}
